<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
      {% if settings.styles %}
        {% for style in settings.styles %}
          <link rel="stylesheet" type="text/css" href="{{ style|escape }}"/>
        {% endfor %}
      {% else %}
        <link rel="stylesheet" type="text/css" href="/gae-wiki-static/layout.css"/>
        <link rel="stylesheet" type="text/css" href="/gae-wiki-static/style.css"/>        
        <!--[if gte IE 6]>
        <link rel="stylesheet" type="text/css" href="/gae-wiki-static/ie.css"/>
        <![endif]-->
      {% endif %}
      <link rel="shortcut icon" href="{% if settings.favicon %}{{ settings.favicon|escape }}{% else %}/gae-wiki-static/favicon.ico{% endif %}" type="image/png" /> 
      <link rel="alternate" type="application/rss+xml" title="New Pages" href="/w/index.rss" /> 
      {% block heads %}{% endblock %}
      <title>{% block title %}{{ settings.wiki_title|escape }}{% endblock %}</title>
      {% if settings.owner_meta %}
        <meta name="google-site-verification" content="{{ settings.owner_meta }}"/>
      {% endif %}
      {% if settings.gaid %}<script type="text/javascript">var _gaq = _gaq || []; _gaq.push(['_setAccount', '{{ settings.gaid }}']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>{% endif %}
      {% for script in settings.extra_scripts %}
        <script type="text/javascript" src="{{ script|escape }}"></script>
      {% endfor %}
      {% if settings.extra_init_script %}
        <script type="text/javascript">{{ settings.extra_init_script }}</script>
      {% endif %}
    </head>
    <body>


    <div id="wrapper">
    {{ header|wikify }}
    {% if search %}
    <div id="search">
        <form method="get" id="searchform" action="http://www.google.com/search">
            <div>
                <input type="text" class="search" value="search" size="15" name="s" id="s" />
                <input type="submit" id="searchsubmit" value="Go" />
            </div>
        </form>
    </div>
    {% endif %}
        
    <div id="main_nav">
        <div class="menu">
            {{ menu|wikify }}
        </div>
        
        <ul class="menu">
        {% if user %}
          <li><a href="/w/profile">{{ user.get_nickname|escape }}</a></li>
          <li><a href="/w/index">Index</a></li>
          <li><a href="/w/changes">Changes</a></li>
          {% if is_admin %}
            <li><a href="/w/users">Users</a></li>
          {% endif %}
            <li><a href="{{ log_out_url|escape }}">Sign out</a></li>
        {% else %}
          <li><a href="{{ log_in_url|escape }}">Log in</a></li>
        {% endif %}      
        </ul>    
    </div>        
        
    <div id="content">
        <div id="entry_content">
          <div class="entry">    
          {% block content %}{% endblock %}
           </div> <!-- close entry -->
        </div> <!-- close entry_content -->      
    </div> <!-- close content -->      

    <div id="supplementary">
        <div class="meta">
            {% if sidebar %}
            <div id="sidebar">
                {{ sidebar|wikify }}
                {% if page.is_saved %}
                    <div class="tools">
                        <h3>Tools</h3>
                        <ul>
                            <li><a href="/w/backlinks?page={{ page.title|uurlencode }}">Pages that link here</a></li>
                        </ul>
                    </div>
                {% endif %}
            </div>
            {% endif %}
        </div> <!-- close meta -->
    </div> <!-- close supplementary -->       
       
    
		{% block footer %}
      <div id="footer">
        <div id="footer_contact">
        {% if page.is_saved %}
        <p id="pm">This page was last edited {% if page.author.get_nickname %}by <a href="/user%3A{{ page.author.get_nickname|uurlencode }}">{{ page.author.get_nickname|escape }}</a>{% else %}anonymously{% endif %} on {{ page.updated|date:"d.m.y" }} at {{ page.updated|date:"H:i" }}.</p>
        {% endif %}        
                </div>
        <div id="footer_info">
            {% if footer %}{{ footer|wikify }}{% endif %}
        </div>

      </div>
		{% endblock %}
        </div> <!-- close wrapper -->
    </body>
</html>
